<?php
/**
* @package controller
* @file indexController.php
* @date 25.01.2010
* @version 1.0
* @copyright Corjanta
* @author Harinath Reddy .
* @todo phpDoc comments
*/
require_once 'Zend/Controller/Action.php';

class News_IndexController extends Cms_Controller_Action
{
	public function init()
	{
	$this->view->siteTitle = 'Corjanta - Static';
	$this->view->params ='';
	$this->view->videos = '/'.$this->CONFIG->path->videos;
	$this->view->vsmall = '/'.$this->CONFIG->path->vsmallThumb;
	$this->view->vbig = '/'.$this->CONFIG->path->vbigThumb;
	}	
	public function indexAction()    
	{  
		$result = Doctrine::getTable('News')->getNews();
		echo '<pre>';print_r($result);exit;
		
	}

	public function viewAction()
	{
		
		$contentId = base64_decode($_GET['id']);		
	    $content = Doctrine::getTable('SiteContent')->getSiteContentDetails($contentId);
		if(count($content)!=0){
		   $this->view->cintentTitle = $content[0]['content_title'];
		   $this->view->cintentDesc = $content[0]['content_desc'];
		} else{
		   $this->view->cintentTitle="";
		   $this->view->cintentDesc="";
		}
	
	}

	public function aboutAction()
	{
		$content = Doctrine::getTable('SiteContent')->getDetails(1);
		if(count($content)!=0){
		   $this->view->cintentTitle = $content[0]['content_title'];
		   $this->view->cintentDesc = $content[0]['content_desc'];
		} else{
		   $this->view->cintentTitle="";
		   $this->view->cintentDesc="";
		}
	}
	
	public function whyCorjantaAction()
	{
		$content = Doctrine::getTable('SiteContent')->getDetails(3);
		if(count($content)!=0){
		   $this->view->cintentTitle = $content[0]['content_title'];
		   $this->view->cintentDesc = $content[0]['content_desc'];
		} else{
		   $this->view->cintentTitle="";
		   $this->view->cintentDesc="";
		}
	}

	public function contactUsAction()
	{
		$content = Doctrine::getTable('SiteContent')->getDetails(2);
		if(count($content)!=0){
		   $this->view->cintentTitle = $content[0]['content_title'];
		   $this->view->cintentDesc = $content[0]['content_desc'];
		} else{
		   $this->view->cintentTitle="";
		   $this->view->cintentDesc="";
		}
	}

	public function howWorksAction()
	{
		$content = Doctrine::getTable('SiteContent')->getDetails(5);
		if(count($content)!=0){
		   $this->view->cintentTitle = $content[0]['content_title'];
		   $this->view->cintentDesc = $content[0]['content_desc'];
		} else{
		   $this->view->cintentTitle="";
		   $this->view->cintentDesc="";
		}
	}

	public function benfitsAction()
	{
		$content = Doctrine::getTable('SiteContent')->getDetails(6);
		if(count($content)!=0){
		   $this->view->cintentTitle = $content[0]['content_title'];
		   $this->view->cintentDesc = $content[0]['content_desc'];
		} else{
		   $this->view->cintentTitle="";
		   $this->view->cintentDesc="";
		}
	}

	public function needDemoAction()
	{
		$content = Doctrine::getTable('SiteContent')->getDetails(7);
		if(count($content)!=0){
		   $this->view->cintentTitle = $content[0]['content_title'];
		   $this->view->cintentDesc = $content[0]['content_desc'];
		} else{
		   $this->view->cintentTitle="";
		   $this->view->cintentDesc="";
		}
	}
	
	
	
	
}